package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"time"
)

func main() {
	client := http.Client{}
	var jsTimeFmt = "Mon Jan 02 2006 15:04:05 MST-0700 (中国标准时间)"
	nowTime := time.Now()
	timestr := nowTime.Format(jsTimeFmt)
	params := url.Values{}
	params.Add("t", timestr)
	postData := url.Values{}
	postData.Add("password", "e10adc3949ba59abbe56e057f20f883e")
	resp, err := client.PostForm(fmt.Sprintf("%s?%s", "http://kfpt.hebjcws.com:7090/encrypt", params.Encode()),
		postData)
	if err != nil {
		log.Fatal(err)
	}
	respBytes, err := ioutil.ReadAll(resp.Body)
	fmt.Print(string(respBytes))

	fmt.Println(resp)
}
